Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start a foreground service during restore #722

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

grote
Copy link
Collaborator

@grote grote commented Aug 20, 2024

Part of #671

so the system won't kill us, even if the user navigates away.
@grote grote force-pushed the restore-foreground-service branch from 3b26e28 to 639947b Compare August 21, 2024 20:28
@grote grote marked this pull request as ready for review August 21, 2024 20:29
If the foreground service doesn't have anything to do and terminates quickly, the system will kill us, even though the service had called startForeground(). To prevent this, we don't promise that our service will be a foreground service. We can still be a foreground service, but escape the punishment if we are too quick.
@grote grote force-pushed the restore-foreground-service branch from 0548b98 to d266c36 Compare August 22, 2024 20:45
@grote grote added this to the 3.x milestone Sep 5, 2024
Copy link
Collaborator

@t-m-w t-m-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work fine. My test sets have been small, making for a short restore process, so I don't know for sure how it would handle a longer process. But for small sets at least, no problems encountered here.

@grote grote merged commit 710354d into seedvault-app:android14 Sep 5, 2024
1 check passed
@grote grote deleted the restore-foreground-service branch September 5, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants